<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/10
 * Time: 11:46
 */

namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class OrderLog extends Model
{
    protected $table='order_log';

    public function addRecord($uid,$order_no,$content,$error_msg){
        $data = [
            'uid'           =>  $uid,
            'order_no'      =>  $order_no,
            'content'       =>  $content,
            'error_msg'     =>  $error_msg,
            'created_at'    =>  time2date(),
        ];
        DB::table('order_log')->insert($data);
    }

}